#include <stdio.h>
#include "Exception.h"
#include "Log.h"

namespace illib{
	namespace Exceptions{
		OutOfMemoryException memory;
		OutOfAlignmentException alignment;
		IllegalArguments arguments;
		IllegalGarbage garbage;
		AssertionFailure assertion;
		Unimplemented unimplemented;
	}

	void __assert(const char *file, uint32_t line, bool result, const char* expr) {
		if (result) return;
		if (!result) {
			Console::print("%s:%d Assertion FAILED: %s", file, line, expr);
			throw Exceptions::assertion;
		}
	}

}
